package com.zly.mybatisdemo.service;

import com.zly.mybatisdemo.dao.UserMapper;
import com.zly.mybatisdemo.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserService {
    @Autowired
    private UserMapper userMapper;

    public List<User> findAllUser() {
        return userMapper.findAllUser();
    }

    public int addUser(User user) {
        return userMapper.addUser(user);
    }

    public int login(User user) {
        return userMapper.login(user);
    }
}
